Blitz (110/144)

From:David McMinn
Date:25 May 2001 at 08:17:13
Subject:Re: Displayscroll and Blitting

Hi Jason

> Thanks for the advice on using Display Scroll, my next problem (yes sorry
> another one) is how can I use the Blitting commands on the Bitmap that I am
> Display Scrolling without the Display Scroll affecting the shapes that I have
> just blitted? I thought that if I Blitted the shapes after I have Display

You can't, DisplayScroll is a hardware thing which always affects the
bitmap which is being displayed. You'd have to come up with some sort of
evil custom blitting functions if you wanted to blit the shapes in a way
so as to not look displayscrolled. Or use sprites which you mention
later. Or rethink what you are using displayscroll for, or possibly
change the way your display is being organised. (Are you using
displayscroll for parallax effects by any chance?)

> Scrolled then I would have been O.K. but the last shape that is Blitted is
> obviously still there next time round which in turn also gets Display Scrolled
> along with the Bitmap, any ideas? (I know that using sprites would solve this
> problem but I really need to Blit the shapes.)

Shapes getting left behind? You'll want to use either queued or buffered
blits. Queued blits remove the background when you remove them from the
bitmap and buffered ones restore the background. Obviously buffered blits
are slower. Both follow the same sort of routine:

; Create a queue or buffer
Queue queuenum,size Buffer buffernum,memorysize

; Then when you blit your shapes you do:
QBlit queuenum,shape,x,y BBlit buffernum,shape,x,y

; When you want to remove them from that frame
Unqueue queuenum Unbuffer buffernum

and so on. Obviously you can use two buffers or queues so that it works
properly on double buffered displays.



|) /\ \/ ][ |) |\/| c |\/| ][ |\| |\| | dave@blitz-2000.co.uk
http://members.nbci.com/david_mcminn | ICQ=16827694
Indentation?! - I will show you how to indent when I indent your skull!
Klingon C++

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list/-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list/-help@netsoc.ucd.ie